]> permondes.de Git - Analog_Engine.git/blame - scripts/alpaca22 Quantum Well.LACE
Quantum Well
[Analog_Engine.git] / scripts / alpaca22 Quantum Well.LACE
CommitLineData
8f52e908
P
1# Visualize the wave functions of a quantum well.
2# This is a realization (with adaptations and corrections) of the application note alpaca_22 from https://analogparadigm.com.
3# Schrödinger's equation is here to psi'' = -(U0+epsilon)*psi
4
5coefficient(1): +1 -> l # left boundary of quantum well
6coefficient(2): -1 -> r # right boundary of quantum well
7coefficient(3): +1 -> +U0 # depth of quantum well
8coefficient(4): +1 -> epsilon # energy of system
9coefficient(5): +1 -> psi'0
10coefficient(6): -1 -> -psi0
11coefficient(8): -1 -> slowing_t # slowing down t
12
13# First, generating a time ramp from -1 to +1
14iintegrate slowing_t -> t
15 IC: +1
16
17# Defining the boundaries of the quantum well
18compare t, l -> well_left
19 GT0: -U0 # LT0 is open, thus =0
20compare t, r -> well
21 LT0: well_left # GT0 is open, thus =0
22
23# adding epsilon to the well and calculating the wave function
24isum epsilon, well -> -(well+epsilon)
25multiply -(well+epsilon), psi -> -(well+epsilon)*psi
26iintegrate -(well+epsilon)*psi -> -psi' # input is psi''
27 IC: psi'0
28iintegrate -psi' -> psi
29 IC: -psi0
30
31multiply psi, psi -> psi^2
32invert well -> -well
33
34output(x): psi
35output(y): psi^2
36output(z): -well
37output(u): t # also used as trigger